<div class="posts-list">
	<div class="holder">
		<div class="col col-1">
			<h1 class="hide">
				<?php __('Blog posts');?>
			</h1>
			<?php foreach ($posts as $post):?>
			<div class="post">
				<div class="date-fx">
					<span class="mnd"><?php echo date('M', $time->toUnix($post['Post']['date']))?></span>
					<span class="day"><?php echo date('d', $time->toUnix($post['Post']['date']))?></span>
				</div>
				<div class="group">
				<h2><?php echo $html->link($post['Post']['title'], array('controller'=>'posts', 'action'=>'view', $post['Post']['slug'])) ?></h2>
				<?php echo $this->element("../posts/elements/meta", array('post'=>$post)); ?>
			    <div class="body html">
					<?php if (!empty($post['Image'])):?>
						<?php 
						$image = $post['Image'][0]; 
						echo $html->link( $gershImage->resize($image['dir'] . DS . $image['filename'], "thumb", array('title'=>$image['title'], 'alt'=>$post['Image'][0]['title'], 'class'=>'intro')), array('action'=>'view', $post['Post']['slug']),null, null, false);
						?>
					<?php endif; ?>

					<?php 
					$more_link = Configure::read('Posts.more_link');
					$body = $post['Post']['body'];
					if($num = strpos($post['Post']['body'], $more_link)) {
						$body = substr($body, 0, $num);
					}
					 ?>
					<?php echo $textile->TextileThis($body); ?>

				</div>
				<?php echo $html->link(__('Permalink for ', true) . $post['Post']['title'], array('controller'=>'posts', 'action'=>'view', $post['Post']['slug']), array('class'=>'action-link') ); ?>
				</div>
			</div>
			
			
			
			<?php endforeach; ?>
			<?php echo $this->element('paging') ?>
		</div>
		<?php echo $this->element('sidebar'); ?>
	</div>

</div>

